<?php


$dir = $_SERVER['DOCUMENT_ROOT']."/cis/upload/";
$timeS = strtotime(date("Ymdhis"));

if(!empty($_FILES)){
	if (!file_exists($targetFolder)){
		//如果指定文件夹不存在，则创建文件夹  
        mkdir($dir, 0777);  
    }

	$file_name = $timeS."_".$_FILES['Filedata']['name'];

	$target = $dir.$file_name;

	move_uploaded_file($_FILES['Filedata']['tmp_name'], $target);

	//判断是新建操作还是更新操作
	$act = $_REQUEST['act'];

	if($act == 'create'){
		mkdir($_SERVER['DOCUMENT_ROOT']."/cis/abc/", 0777);
	}

	if($act == 'update'){
		mkdir($_SERVER['DOCUMENT_ROOT']."/cis/ddd/", 0777);
	}

}
?>